package com.siyuan.test.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @className: UserService
 * @Description: TODO
 * @author: wzq
 * @date: 2022/8/23 16:43
 */
@Component // 注册一个bean
public class UserService {

	@Autowired
	private OrderService orderService;

	public void test(){
		System.out.println("UserService.test()");
	}

	public UserService() {
		System.out.println("无参构造");
	}


	@Autowired
	public UserService(OrderService orderService3) {
		this.orderService = orderService;
		System.out.println("有参构造1");
	}

	public UserService(OrderService orderService,OrderService orderService1) {
		this.orderService = orderService;
		System.out.println("有参构造2");
	}
}
